/**
 * 
 */
package com.doone.telmarket.domain;

import java.io.Serializable;
import java.util.Date;

/**
 * @author 吴同庆
 * @date 2009-10-13
 * @description
 * @package com.doone.telmarket.domain
 */
public class Comment implements Serializable {

	private static final long serialVersionUID = -2253802120285093027L;

	//评论ID
	private Integer commentId;

	//业务代码
	private Integer serviceCode;

	//用户ID
	private String userId;

	//昵称
	private String nickName;

	//评论内容
	private String comment;

	//评论创建时间
	private Date createTime;

	//审核状态
	private VerifyState verifyState;

	//审核时间
	private Date verifyTime;

	public Comment() {

	}

	public Comment(Integer serviceCode, String userId, String nickName, String comment) {
		this.serviceCode = serviceCode;
		this.userId = userId;
		this.nickName = nickName;
		this.comment = comment;
		createTime = new Date();
		verifyState = VerifyState.UNV;
	}

	public Integer getCommentId() {
		return commentId;
	}

	public void setCommentId(Integer commentId) {
		this.commentId = commentId;
	}

	public Integer getServiceCode() {
		return serviceCode;
	}

	public void setServiceCode(Integer serviceCode) {
		this.serviceCode = serviceCode;
	}

	public String getUserId() {
		return userId;
	}

	public void setUserId(String userId) {
		this.userId = userId;
	}

	public String getNickName() {
		return nickName;
	}

	public void setNickName(String nickName) {
		this.nickName = nickName;
	}

	public String getComment() {
		return comment;
	}

	public void setComment(String comment) {
		this.comment = comment;
	}

	public Date getCreateTime() {
		return createTime;
	}

	public void setCreateTime(Date createTime) {
		this.createTime = createTime;
	}

	public VerifyState getVerifyState() {
		return verifyState;
	}

	public void setVerifyState(VerifyState verifyState) {
		this.verifyState = verifyState;
	}

	public Date getVerifyTime() {
		return verifyTime;
	}

	public void setVerifyTime(Date verifyTime) {
		this.verifyTime = verifyTime;
	}

	public String getVerifyStateDesc() {
		return getVerifyState().getDesc();
	}

	//审核评论
	public Comment verifyComment(String state) {
		VerifyState verifyState = VerifyState.valueOf(state);
		setVerifyState(verifyState);
		setVerifyTime(new Date());
		return this;
	}

}
